]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Replace Clutter.Actor.get_allocation_geometry()
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 21 Oct 2019 15:42:12 +0000 (17:42 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 21 Oct 2019 16:41:35 +0000 (18:41 +0200)
The function was deprecated and has now been dropped from mutter.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/776

js/ui/lookingGlass.js
tests/interactive/background-size.js

index 999950248985bc3aa7da892c366fa59c2d3082a9..cadd4012df3dbb170dd99867d9d6862226712f6e 100644 (file)
@@ -477,16 +477,16 @@ class RedBorderEffect extends Clutter.Effect {
         color.init_from_4ub(0xff, 0, 0, 0xc4);
         Cogl.set_source_color(color);
 
-        let geom = actor.get_allocation_geometry();
+        let alloc = actor.get_allocation_box();
         let width = 2;
 
         // clockwise order
-        Cogl.rectangle(0, 0, geom.width, width);
-        Cogl.rectangle(geom.width - width, width,
-                       geom.width, geom.height);
-        Cogl.rectangle(0, geom.height,
-                       geom.width - width, geom.height - width);
-        Cogl.rectangle(0, geom.height - width,
+        Cogl.rectangle(0, 0, alloc.get_width(), width);
+        Cogl.rectangle(alloc.get_width() - width, width,
+                       alloc.get_width(), alloc.get_height());
+        Cogl.rectangle(0, alloc.get_height(),
+                       alloc.get_width() - width, alloc.get_height() - width);
+        Cogl.rectangle(0, alloc.get_height() - width,
                        width, width);
     }
 });
index 91f8149c7905426974fa9cf2a4671e7e5cd1ee39..7b18f895013a07093cbdedee7998192b5caaef9f 100644 (file)
@@ -36,16 +36,16 @@ function test() {
             obin.connect_after('paint', actor => {
                 Cogl.set_source_color4f(0, 1, 0, 1);
 
-                let geom = actor.get_allocation_geometry();
+                let alloc = actor.get_allocation_box();
                 let width = 3;
 
                 // clockwise order
-                Cogl.rectangle(0, 0, geom.width, width);
-                Cogl.rectangle(geom.width - width, width,
-                               geom.width, geom.height);
-                Cogl.rectangle(0, geom.height,
-                               geom.width - width, geom.height - width);
-                Cogl.rectangle(0, geom.height - width,
+                Cogl.rectangle(0, 0, alloc.get_width(), width);
+                Cogl.rectangle(alloc.get_width() - width, width,
+                               alloc.get_width(), alloc.get_height());
+                Cogl.rectangle(0, alloc.get_height(),
+                               alloc.get_width() - width, alloc.get_height() - width);
+                Cogl.rectangle(0, alloc.get_height() - width,
                                width, width);
             });
         tbox.add(obin);